<script lang="tsx">
import { defineComponent } from "vue"

export default defineComponent({
    props: {
        type: String,
        color: String,
    },
    data() {
        return {
            count: 1
        }
    },
    methods: {
        add() {
            this.count++
        }
    },
    render() {
        return (
            <div class="my-button-wrap cmp">
                <h2>{ this.count }</h2>
                <h3>{ (this.type ?? '')  + ' ' +  this.color }</h3>
                <button onClick={this.add} data-type={this.type} data-color={this.color}>MyButton addOne</button>
            </div>
        )
    }
})

</script>